<%@page isELIgnored="false" import="java.net.*" %>
<%@taglib prefix="tiles" uri="struts-tiles" %>
<%@taglib prefix="html" uri="struts-html" %>
<%@taglib prefix="bean" uri="struts-bean" %>
<%@taglib prefix="c" uri="jstl" %>
<%@taglib prefix="fn" uri="jstl-fn" %>

<%@page import="com.mastercard.assets.web.util.to.UserLogin"%><c:set var="Salidas" value="${TareasOperationForm.salidasManager.salidas}" />
					<div id="bodyContent">
						<h1>Edit Task Exits</h1>
						<div onclick="location.href='${URLBase}Flujos.do';" style="display: inline; color: blue; font-size: 12px;" onmouseover="this.style.textDecoration='underline';this.style.cursor='pointer';" onmouseout="this.style.textDecoration='none';this.style.cursor='default';" >Flows</div><div style="display: inline; color: black; font-size: 12px;" > > </div>
						<div onclick="document.getElementById( 'TareasForm' ).submit( );" style="display: inline; color: blue; font-size: 12px;" onmouseover="this.style.textDecoration='underline';this.style.cursor='pointer';" onmouseout="this.style.textDecoration='none';this.style.cursor='default';" >Flow Tasks (${Tarea.tblFlujo.nombre})</div><div style="display: inline; color: black; font-size: 12px;" > > </div>
						<div style="display: inline; color: black; font-size: 12px;"  >Edit Task Exits (${Tarea.nombre})</div>
						<br/>
						<br/>
						<html:form action="/TareasOperation" method="post" styleId="TareasForm">
						<div style="width: 100%; text-align: right;"><html:image src="images/btnRegresar.gif" style="display: inline;" /></div>
						<html:hidden property="cveFlujo" value="${Tarea.tblFlujo.cveFlujo}"/>
						<html:hidden property="cveTarea" value="${Tarea.cveTarea}"/>
						<html:hidden property="operation" value="18"/>
						</html:form>
						<center>
						<div class='errors'>
						<html:errors/>
						<br/>
						${UserLogin.messageError}
						</div>
						
						<table class="TablaCatalogosNuevoTipoCuenta">
							<thead>
								<tr>
									<th>
										Exits for the task ${Tarea.nombre}
									</td>
								</tr>
							</thead>
							<tr>
								<td>
									<br/>
									<table class='TablaCatalogosFields' border="0" style="width: 650px;">
										<thead>
											<tr>
												<th width="20%">Name</th>
												<th width="40%">Description</th>
												<th width="30%">Tasks</th>
												<th width="10%"></th>
											</tr>
										</thead>
<c:forEach items="${Salidas}" var="salida" varStatus="salidaStatus">
										<tr>
											<td>${salida.salida.nombre}</td>
											<td>${salida.salida.descripcion}</td>
											<td>
												<html:form action='/TareasRegistrarFormasSalidas' method='post' styleId="TareasRegistrarFormasSalidas-${salidaStatus.index}">
												<html:hidden property="cveTarea" value="${Tarea.cveTarea}" />
												<html:hidden property="cveFlujo" value="${Tarea.tblFlujo.cveFlujo}" />
												<html:hidden property="cveSalida" value="${salida.salida.cveSalida}"/>
												<html:select property="formas" style="height: 100px; width: 180px;" multiple="multiple">
<c:forEach items="${salida.formaParaSalidas}" var="forma" varStatus="formaStatus">
<c:if test="${forma.elegida}">
													<option selected="selected" value="${forma.tarea.cveTarea}">${forma.tarea.nombre}</option>
</c:if>
<c:if test="${not forma.elegida}">
													<option value="${forma.tarea.cveTarea}">${forma.tarea.nombre}</option>
</c:if>
</c:forEach>
												</html:select>
												</html:form>
											</td>
											<td>
												<img onmouseover="this.style.cursor='pointer';" onmouseout="this.style.cursor='default';" src="images/btnGenerar.gif" onclick="document.getElementById( 'TareasRegistrarFormasSalidas-${salidaStatus.index}' ).submit( ) ;" />
												&nbsp;
												<img onmouseover="this.style.cursor='pointer';" onmouseout="this.style.cursor='default';" src="images/btnAddAlertas.gif" onclick="document.getElementById( 'operationId' ).value='8';document.getElementById( 'cveSalida2' ).value='${salida.salida.cveSalida}';document.getElementById( 'FormaAgregar' ).submit( ) ;" />
											</td>
										</tr>
</c:forEach>
<%--
										<tr>
											<td colspan='2' class='TDButton'>
												<html:submit value='Terminar' onclick="document.getElementById( 'operation' ).value='7';return true ;" styleClass="ButtonSubmit" />
											</td>
										</tr>
 --%>
									</table>
												<html:form action='/TareasAgregarRegistrar' method='post' styleId="FormaAgregar">
												<html:hidden property="cveTarea" />
												<html:hidden property="cveFlujo" />
												<html:hidden property="cveSalida" styleId="cveSalida2" />
												<html:hidden property="operation" styleId="operationId" value="0" />
												<html:hidden property="page" value="3" />
												</html:form>
								</td>
							</tr>
						</table>
						</center>
					</div>
					<div id="footContent"></div>
<%
UserLogin user = ( UserLogin ) request.getSession( ).getAttribute( "UserLogin" ) ;
user.clearMessageError( ) ;
%>